﻿using System;
using System.Web.Mvc;

namespace EditRegion.MVC.Controllers
{
    [HandleError]
    public class EditRegionController : Controller
    {
        [AcceptVerbs(HttpVerbs.Post)]
        [ValidateInput(false)]
        public string Save(string  id,  string content)
        {
            try
            {
                HtmlServer htmlServer = new HtmlServer();
                htmlServer.SaveContent(id, content);
                return id + ",true,Saved Successfully!";
            }
            catch (Exception exception)
            {
                return id + ",false," + exception.Message;
            }
        }
    }
}